#ifndef LINEPAINTER_H
#define LINEPAINTER_H

#include <QWidget>
#include <QGraphicsLineItem>
#include <QGraphicsScene>
#include <QTimer>
namespace Ui {
class LinePainter;
}
/**
 * @brief The LinePainter class 线角度
 */
class LinePainter : public QWidget
{
    Q_OBJECT

public:
    explicit LinePainter(QWidget *parent = nullptr);
    ~LinePainter();

public:
    void updateLine();
public:
    /**
     * @brief slotUpdateLinePos 更新线位置
     */
    void slotUpdateLinePos();
private:
    Ui::LinePainter *ui;
    QGraphicsScene* scene = nullptr;// 画布
    QGraphicsLineItem* line1 = nullptr;
    QGraphicsLineItem* line2 = nullptr;
    QTimer* m_timer;
    QRect border_rect;
};

#endif // LINEPAINTER_H
